import React, {Component} from 'react';
import {BrowserRouter as Router,Route,Routes} from 'react-router-dom'
import Home from "./components/Home/homePage";
import Register from "./components/Register/registerPage";
import SignIn from "./components/SignIn/signInPage";
import Forget from "./components/Forget/forgetPassword";

class App extends Component {
    render() {
        return (
            <Router>
                <Routes>
                    {/*已经启动了react-router-dom6.0.1,Switch被替换为Routes，另外element属性取代component属性*/}
                    <Route exact path='/' element={<Home/>}/>
                    <Route exact path='/register' element={<Register/>}/>
                    <Route exact path='/login' element={<SignIn/>}/>
                    <Route exact path='/resetting' element={<Forget/>}/>

                </Routes>
            </Router>
        );
    }
}

export default App;